<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
        #main {
           position: relative;
           width: 130px;
           height: 30px;
          font: 2px bold 15px "Microsoft Yahei";
          line-height: 30px;
          color: white;
          text-align: center;
          background:-webkit-linear-gradient(top,#0aa1ed 0%,#27b1f6 100%);
          border-radius: 3px;
          animation:mymove 5s infinite;
        }
          
        @keyframes mymove {
          from{
             left: 0px;
          }
          to {
             left: 200px;
          }
        }

        #main:hover {
         
           background:red;
           cursor: pointer;
        }

  </style>
</head>
<body>
   <div id="main">点我试试</div>
   <script src="index.js" type="text/javascript" defer></script>
</body>
</html>